extends ./../layout.jade
append script
    script.
        $(function(){
            $('.popup').popup();
            $('.ui.dropdown').dropdown();
            $('.ui.pointing.secondary.menu a.item').eq(0).addClass('active');
        });
    script(src="/js/project.station.test.js")

block content
    br
    .ui.breadcrumb
        a.section(href="/home") 首页
        i.right.chevron.icon.divider
        a.section #{project.name}
        i.right.chevron.icon.divider
        a.section.active 全站仪中心配置
        
    h2.ui.header
        span.ui.header #{project.name}配置
        .sub.header 全站仪中心配置
    .ui.divider
    include navigator.jade
    div
        form.ui.form(action='/project/'+project.id+'/stationconfig',method="post")
            input(type="hidden" , value=project.id , name="prjId")
            table.ui.table.celled
                thead
                    th 中心名称
                    th E坐标
                    th N坐标
                    th H坐标
                    th 里程
                    th com端口
                    th(style="width:200px;") 操作
                tbody
                    each station,index in stations
                        tr
                            td
                                a.origin.popup(href="/project/"+project.id+"/stationconfig/"+station.id+"/learn",data-content="点击进入全站仪学习") #{station.name} 
                            td #{station.e} 
                            td #{station.n} 
                            td #{station.h}
                            td #{station.mileage}
                            td
                                .ui.selection.dropdown
                                    input(type="hidden",name="com",value=tpsCom,id="com-input-"+station.id)
                                    i.dropdown.icon
                                    .text #{tpsCom}
                                    .menu
                                        - for (var x = 1; x < 11; x++)
                                            .item(data-value='COM'+x) COM#{x}
                            td
                                a.button.ui.orange.test(data-station-id=station.id) 测试
                                a.button.ui.grey(href='/project/'+project.id+'/stationconfig/'+station.id+'/delete') 删除
                    tr
                        td
                            .field
                                input(type="text",name="name",required="required")
                        td
                            .field
                                input(type="text",name="e",required="required")
                        td
                            .field
                                input(type="text",name="n",required="required")
                        td
                            .field
                                input(type="text",name="h",required="required")
                        td
                            .field
                                input(type="text",name="mileage",required="required")
                        td
                            .ui.selection.dropdown
                                input(type="hidden",name="com",value=tpsCom)
                                i.dropdown.icon
                                .text #{tpsCom}
                                .menu
                                    - for (var x = 1; x < 11; x++)
                                        .item(data-value='COM'+x) COM#{x}
                        td
                            button.ui.blue.button(type="submit") 增加